package com.ruoyi.appointment.dao.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.appointment.dao.CcsProcessDao;
import com.ruoyi.appointment.domain.CcsProcess;
import com.ruoyi.appointment.mapper.CcsProcessMapper;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.system.mapper.SysRoleMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CcsProcessDaoImpl extends ServiceImpl<CcsProcessMapper, CcsProcess>  implements CcsProcessDao {


    @Override
    public List<CcsProcess> selectProcessList(Long userId) {
        return lambdaQuery()
                .eq(CcsProcess::getUserId, userId)
                .list();
    }

    @Override
    public boolean buildPowerForCNMedicine(CcsProcess ccsProcess, String flag) {
        return getBaseMapper().insertCNMedicinePower(ccsProcess.getUserId(), flag);
    }

}
